@extends('system.frame_layout')
<?php $parent_menu = "会员管理"; $menu_selected = "会员节点关系图";?>
@section('content')
    <div class="formbody">
        <div class="node-canvas center-block">
            <div class="node center-block">
                <div class="title"><a
                            href="{{route('sys.node.tree',['uid'=>$user->nid])}}">{{$user->username}}</a>
                </div>
                <div class="brand">
                    @if($user->ok_status == \App\Models\MUser::$STATUS_ACTIVATED)
                        <span class="green">已激活会员</span>
                    @else
                        <span class="red">未激活会员</span>
                    @endif
                </div>
                <div class="ab">
                    <div>注册时间</div>
                    <div>激活时间</div>
                </div>
                <div class="ab">
                    <div>{{date("Y-m-d",$user->reg_time)}}</div>
                    <div>{{$user->ok_time == NULL ? "无" : date("Y-m-d",$user->ok_time)}}</div>
                </div>
                <div class="brand no-border-bottom">
                    @if($user->bdzx_status == \App\Models\MUser::$BDZX_YES)
                        <span class="green">报单中心</span>
                    @else
                        <span class="green">普通会员</span>
                    @endif
                </div>
            </div>
            <div class="line">
                <div class="center-block" style="height: 60px;width: 1px;">
                </div>
                <div style="width: 100%;height: 1px;">
                </div>
            </div>
            <div class="node left">
                <?php $a = $user->auser(); ?>
                @if(!empty($a))
                    <div class="title">
                        <a href="{{route('sys.node.tree',['uid'=>$a->id])}}">{{$a->username}}</a>
                    </div>
                    <div class="brand">
                        @if($a->ok_status == \App\Models\MUser::$STATUS_ACTIVATED)
                            <span class="green">已激活会员</span>
                        @else
                            <span class="red">未激活会员</span>
                        @endif
                    </div>
                    <div class="ab">
                        <div>注册时间</div>
                        <div>激活时间</div>
                    </div>
                    <div class="ab">
                        <div>{{date("Y-m-d",$a->reg_time)}}</div>
                        <div>{{$a->ok_time == NULL ? "无" : date("Y-m-d",$a->ok_time)}}</div>
                    </div>
                    <div class="brand no-border-bottom">
                        @if($a->bdzx_status == \App\Models\MUser::$BDZX_YES)
                            <span class="green">报单中心</span>
                        @else
                            <span class="green">普通会员</span>
                        @endif
                    </div>
                @else
                    <div class="title">
                        <a target="_blank" href="{{ route('web.reg.page',['no'=>$user->no]) }}">注册此节点会员(A)</a>
                    </div>
                    <div class="brand" style="border: 0;"></div>
                    <div class="ab" style="border: 0;"></div>
                    <div class="ab" style="border: 0;"></div>
                    <div class="brand no-border-bottom" style="border: 0;"></div>
                @endif
            </div>
            <div class="node right">
                <?php $b = $user->buser(); ?>
                @if(!empty($b))
                    <div class="title">
                        <a href="{{route('sys.node.tree',['uid'=>$b->id])}}">{{$b->username}}</a>
                    </div>
                    <div class="brand">
                        @if($b->ok_status == \App\Models\MUser::$STATUS_ACTIVATED)
                            <span class="green">已激活会员</span>
                        @else
                            <span class="red">未激活会员</span>
                        @endif
                    </div>
                    <div class="ab">
                        <div>注册时间</div>
                        <div>激活时间</div>
                    </div>
                    <div class="ab">
                        <div>{{date("Y-m-d",$b->reg_time)}}</div>
                        <div>{{$b->ok_time == NULL ? "无" : date("Y-m-d",$b->ok_time)}}</div>
                    </div>
                    <div class="brand no-border-bottom">
                        @if($b->bdzx_status == \App\Models\MUser::$BDZX_YES)
                            <span class="green">报单中心</span>
                        @else
                            <span class="green">普通会员</span>
                        @endif
                    </div>
                @else
                    <div class="title">
                        <a target="_blank" href="{{ route('web.reg.page',['no'=>$user->no]) }}">注册此节点会员(B)</a>
                    </div>
                    <div class="brand" style="border: 0;"></div>
                    <div class="ab" style="border: 0;"></div>
                    <div class="ab" style="border: 0;"></div>
                    <div class="brand no-border-bottom" style="border: 0;"></div>
                @endif
            </div>
        </div>
    </div>
@endsection